/* MultiLOC - Decompiled by JCavaj
 * Visit http://www.bysoft.se/sureshot/jcavaj/
 */
package textui;
import java.io.File;
import java.text.DecimalFormat;

import Model.FileList;
import Model.LOCcounter;

public class MultiLOC
{
    private LOCcounter theLOC;
    private boolean doComments = true;
    private String path = "";
    
    public MultiLOC(boolean bool, String string) {
	doComments = bool;
	if (string != null)
	    path = string;
    }
    
    public void countLines() {
	boolean bool = false;
	int i = 0;
	DecimalFormat decimalformat = new DecimalFormat("00000");
	theLOC = new LOCcounter();
	theLOC.setCommentState(doComments);
	String[] strings = FileList.readFilenames();
	System.out.println();
	for (int i_0_ = 0; i_0_ < strings.length; i_0_++) {
	    File file = new File(path + strings[i_0_]);
	    if (file.isFile()) {
		int i_1_ = theLOC.getLinesInFile(file.getPath());
		i += i_1_;
		System.out
		    .println(decimalformat.format((long) i_1_) + " " + file);
	    }
	}
	System.out.println("-----");
	System.out.println(decimalformat.format((long) i));
    }
}
